package top.frsf.pattern.c_behavioral.b_chainrespon.tomcat;

import top.frsf.pattern.c_behavioral.b_chainrespon.tomcat.impl.HttpFilter;
import top.frsf.pattern.c_behavioral.b_chainrespon.tomcat.impl.HttpHeaderFilter;
import top.frsf.pattern.c_behavioral.b_chainrespon.tomcat.impl.HttpServlet;

import javax.servlet.ServletException;
import java.io.IOException;

/**
 * @author FRSF
 * @since 2024/8/31 18:38
 */
public class Main {
    public static void main(String[] args) throws ServletException, IOException {
        // init
        ApplicationFilterChain filterChain = new ApplicationFilterChain();
        filterChain.addFilter(new HttpFilter());
        filterChain.addFilter(new HttpHeaderFilter());
        filterChain.setServlet(new HttpServlet());

        // service
        filterChain.doFilter(null, null);
    }
}
